package com.example.widget.view

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel

class LiveDataViewModel : ViewModel() {
    val data: MutableLiveData<List<String>> by lazy {
        MutableLiveData<List<String>>()
    }

    fun getData() {
        val list = ArrayList<String>()
        for (i in 1..10) {
            list.add("列表item_$i")
        }
        data.value = list
    }
}